fix(rootfs/qemu-static): use direct armhf exec probe instead of broken arch-test gate#140
fix(rootfs/qemu-static): use direct armhf exec probe instead of broken arch-test gate#140iav wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d6d4728c3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42eb08da2e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…n arch-test gate `arch-test arm` probes ARMv5 EABI, divergent from kernel COMPAT (armhf EABI v5+), and returns failure on modern aarch64 hosts (Ubuntu Noble 6.8 / Ampere Altra) with a fully working CONFIG_COMPAT path — routing mmdebstrap through qemu-user emulation at ~10× slowdown. Replace with a 4-tier detection: prefer the packaged `/usr/share/binfmts/qemu-arm` descriptor if present, trust an already-enabled kernel registration, otherwise probe COMPAT directly by exec'ing `ld-linux-armhf.so.3`, falling back to the hand-rolled descriptor only when none applies. Assisted-by: Claude:claude-opus-4.7
c456ae4 to
1c66025
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c66025814
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
1c66025 to
12f0371
Compare
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…registration When CONFIG_COMPAT runs armhf binaries natively on aarch64 (≈10× faster than qemu-user emulation), but qemu-arm is registered in kernel binfmt_misc, the previous "trust existing setup" check returned early and the build went through qemu anyway. Empirically: helios4 build 41 min via qemu vs 19 min native COMPAT on droid (RK3399). Reorder probes: 1. Snapshot initial qemu-arm state. 2. COMPAT probe must run with qemu-arm OFF — kernel binfmt_misc routes armhf exec through qemu first when enabled, making the probe a liar about native capability. Temp-disable before probe; on probe failure (no COMPAT, e.g. Apple Silicon under HVF where AArch32@EL0 SIGILL's) restore qemu-arm and fall through to qemu setup. Toggle errors are not swallowed. 3. Trust-existing path validates via arch-test arm — the `enabled` flag alone does not attest that the interpreter actually runs (stale path, removed package); without this, broken registrations passed setup and failed later in chroot. 4. _verify_qemu_arm_executes helper called after each successful import/enable/repair branch, so qemu issues fail fast at host-prepare time instead of mid-rootfs-build. The descriptor itself is left intact — only the active flag is toggled. Gated by ARMBIAN_PREFER_NATIVE_ARMHF=no for explicit opt-out. Behaviour preserved on hosts without COMPAT. Assisted-by: Claude:claude-opus-4.7
…uilds Spell out the practical effect of CONFIG_COMPAT + COMPAT_VDSO + ARM64_32BIT_EL0: an arm64 host running such a kernel can execute armhf userspace natively, so rootfs/chroot steps run native instead of via qemu-user-static (~10× faster). Cross-reference the rootfs probe and the ARMBIAN_PREFER_NATIVE_ARMHF switch, and note the Apple-M-series exception (no AArch32@EL0 in silicon). Assisted-by: Claude:claude-opus-4.7
752bb11 to
dbd7005
Compare
codex-trap mirror of upstream PR armbian#9820 (re-opened after force-push made the old head commit unreachable; previous trap was #117).
Latest CR nitpick fix (
|| trueoutsiderun_host_command_logged arch-testinSHOW_DEBUG=yesdebug branch) is included; squashed into the single commit.@codex review